home *** CD-ROM | disk | FTP | other *** search
/ Learn Microsoft Visual Basic 6.0 Now / Learn Microsoft Visual Basic 6.0 Now (Microsoft Press)(X03-58607)(1998).ISO / samples / ch05 / lab5.frm < prev    next >
Text File  |  1998-06-07  |  3KB  |  98 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   3795
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1515
  7.    ClientWidth     =   5430
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3795
  10.    ScaleWidth      =   5430
  11.    Begin VB.CommandButton Command1 
  12.       Caption         =   "Quit"
  13.       Height          =   375
  14.       Left            =   3240
  15.       TabIndex        =   5
  16.       Top             =   2880
  17.       Width           =   1095
  18.    End
  19.    Begin VB.ListBox List1 
  20.       Height          =   1620
  21.       Left            =   360
  22.       TabIndex        =   0
  23.       Top             =   1200
  24.       Width           =   1935
  25.    End
  26.    Begin VB.Label Label4 
  27.       BorderStyle     =   1  'Fixed Single
  28.       ForeColor       =   &H00000080&
  29.       Height          =   375
  30.       Left            =   2640
  31.       TabIndex        =   4
  32.       Top             =   1200
  33.       Width           =   2415
  34.    End
  35.    Begin VB.Label Label3 
  36.       Height          =   255
  37.       Left            =   2640
  38.       TabIndex        =   3
  39.       Top             =   960
  40.       Width           =   1695
  41.    End
  42.    Begin VB.Label Label2 
  43.       Caption         =   "Choose a country"
  44.       Height          =   255
  45.       Left            =   360
  46.       TabIndex        =   2
  47.       Top             =   960
  48.       Width           =   1935
  49.    End
  50.    Begin VB.Label Label1 
  51.       Caption         =   "International Welcome Program"
  52.       BeginProperty Font 
  53.          Name            =   "Times New Roman"
  54.          Size            =   13.5
  55.          Charset         =   0
  56.          Weight          =   700
  57.          Underline       =   0   'False
  58.          Italic          =   0   'False
  59.          Strikethrough   =   0   'False
  60.       EndProperty
  61.       Height          =   375
  62.       Left            =   720
  63.       TabIndex        =   1
  64.       Top             =   240
  65.       Width           =   3855
  66.    End
  67. End
  68. Attribute VB_Name = "Form1"
  69. Attribute VB_GlobalNameSpace = False
  70. Attribute VB_Creatable = False
  71. Attribute VB_PredeclaredId = True
  72. Attribute VB_Exposed = False
  73. Private Sub Command1_Click()
  74.     End
  75. End Sub
  76.  
  77. Private Sub Form_Load()
  78.     List1.AddItem "England"
  79.     List1.AddItem "Germany"
  80.     List1.AddItem "Spain"
  81.     List1.AddItem "Italy"
  82. End Sub
  83.  
  84. Private Sub List1_Click()
  85.     Label3.Caption = List1.Text
  86.     Select Case List1.ListIndex
  87.     Case 0
  88.         Label4.Caption = "Hello, programmer"
  89.     Case 1
  90.         Label4.Caption = "Hallo, Programmierer"
  91.     Case 2
  92.         Label4.Caption = "Hola, programador"
  93.     Case 3
  94.         Label4.Caption = "Ciao, programmatori"
  95.     End Select
  96. End Sub
  97.  
  98.